package com.chuanke.ckfamily.service.exception;

import com.chuanke.ckfamily.service.base.FailCode;

public class CFException extends Exception{

    private int code;

    private String msg;

    public CFException(FailCode code, String msg) {
        this.code = code.getCode();
        this.msg = msg;
    }
    public CFException(FailCode code) {
        this.code = code.getCode();
        this.msg = code.getMsg();
    }
    

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String toString() {
        return "code:" + code + ";" + msg;
    }
}
